package StateExpress;

import tag.constants;


/**
 * Nálada (obecný vnitřní stav).
 *
 * @author Vojtěch Hordějčuk
 */
public interface Direction
{
  
  public boolean check();
  public void move();
  public float get_x();
  public float get_y();
  String getRepresentation();

  
}

/**
 * Pocit štěstí (konkrétní vnitřní stav).
 *
 * @author Vojtěch Hordějčuk
 */

class x_and_y{
	static int x=0;
	static int y=0;
}


class Left implements Direction,constants
{
  public boolean check()
  {
	  return x_and_y.x>0;
    
  }

public void move() {
	

		x_and_y.x-=cell_size;
		
	
}

public float get_x() {
	return x_and_y.x;
}

public float get_y() {
	return x_and_y.y;
}

public String getRepresentation() {
	
	return "LEFT";
}
}



class Right implements Direction,constants
{
  public boolean check()
  {
	  return x_and_y.x<frame_width;
  }

public void move() {

	x_and_y.x+=cell_size;
}

public float get_x() {
	return x_and_y.x;
}

public float get_y() {
	return x_and_y.y;
}
public String getRepresentation() {
	
	return "RIGHT";
}
}

class Up implements Direction,constants
{
  public boolean check()
  {
	  return x_and_y.y>0;
  }

public void move() {
	x_and_y.y-=cell_size;
}

public float get_x() {
	return x_and_y.x;
}

public float get_y() {
	return x_and_y.y;
}
public String getRepresentation() {
	
	return "UP";
}
}

class Down implements Direction,constants
{
  public boolean check()
  {
	  return x_and_y.y<frame_height;
  }

public void move() {
	
		
	x_and_y.y+=cell_size;
		
	
	
}

public float get_x() {
	return x_and_y.x;
}

public float get_y() {
	return x_and_y.y;
}
public String getRepresentation() {
	
	return "DOWN";
}
}

